import matplotlib.pyplot as plt

# Read speed data
with open('speed.txt', 'r') as f:
    speeds = [float(line.strip()) for line in f]

# Generate time points (assuming 0.5 second intervals)
times = [i for i in range(len(speeds))]

# Plot the speed curve
plt.figure(figsize=(10, 6))
plt.plot(times, speeds, 'b-', linewidth=1.5)
plt.title('File Copy Speed')
plt.xlabel('Time (seconds)')
plt.ylabel('Speed (MB/s)')
plt.grid(True)
plt.savefig('speed_curve.png')
plt.show()